﻿using System;

namespace NotAClue.ComponentModel.DataAnnotations
{
    [Flags]
    public enum PageTemplate
    {
        // empty
        None           = 0x00,
        // standard page templates
        Details        = 0x001,
        Edit           = 0x002,
        Insert         = 0x004,
        List           = 0x008,
        ListDetails    = 0x010,
        // custom page templates
        DetailsList    = 0x020,
        EditList       = 0x040,
        UpdateableList = 0x080,
        Step           = 0x100,
        // can't find a page template that matches
        Unknown        = 0x800,
    }

    public static class CombinedPageTemplates
    {
        /// <summary>
        /// Read Only access (AllowActions.Details | AllowActions.List)
        /// </summary>
        public const PageTemplate All =
            PageTemplate.Details |
            PageTemplate.Edit |
            PageTemplate.Insert |
            PageTemplate.List |
            PageTemplate.ListDetails |
            PageTemplate.DetailsList |
            PageTemplate.EditList|
            PageTemplate.UpdateableList;
    }
}
